import { defineStore } from "pinia";

export const useCanvasStore = defineStore("canvas", {
    state: () => ({
        canvasDataList: [] as any[], // 存储画布组件数据
    }),
    actions: {
        addCanvasData(data: any) {
            // 向画布数据中添加新组件
            this.canvasDataList.push(data);
        },
    },
});